﻿Public Class Messenger
    Shared Event MessengerMessage(MessageType As MessageType, MessageContent As MessageContent)
    Shared Sub SendMessage(MessageType As MessageType, MessageText As String, Success As Boolean)
        RaiseEvent MessengerMessage(MessageType, New MessageContent With {.Message = MessageText, .Success = Success})
    End Sub
    Enum MessageType
        'General
        UpdateStart = 3
        UpdateEnd = 4
        GeneralMessage = 5
        LogMessage = 6

        'Category
        CategoryEdit = 200
        CategoryAdd = 201

        'Application
        AppSelected = 100
        AppUpdated = 101
        AppEvent = 102

        'Pack
        DoPack = 300
        PackCompleted = 302

        'Sign
        DoSign = 400

        'WaitForm
        WaitformOpen = 1000
        WaitFormMessage = 1001
        WaitFormClose = 1002

        'Page
        ChangePage = 500
    End Enum
    Class MessageContent
        Property Message As String
        Property Success As Boolean

    End Class
End Class
